#include<stdio.h>
#include<iostream>
#include<string.h>
using namespace std;
int main()
{
	int num[10 + 5], n, i, j, mul, count;
	while (cin >> n)
	{
		mul = 1;
		for (i = 0; i < n; i++)
		{
			cin >> num[i];
			mul *= num[i];
		}
		for (i = 1; i <= mul; i++)
		{
			count = 0;
			for (j = 0; j < n; j++)
			{
				if (i % num[j])break;
				count++;
			}
			if (count == n)
			{
				cout << i << endl;
				break;
			}
		}
	}
	return 0;
}